[POWERPC] Merge with xen-unstable.hg.
authorHollis Blanchard <hollisb@us.ibm.com>
Tue, 12 Dec 2006 15:58:42 +0000 (09:58 -0600)
committerHollis Blanchard <hollisb@us.ibm.com>
Tue, 12 Dec 2006 15:58:42 +0000 (09:58 -0600)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
1  2 
.hgignore
tools/libxc/xenctrl.h
tools/python/xen/lowlevel/xc/xc.c
tools/python/xen/xend/image.py
xen/arch/powerpc/Makefile
xen/common/Makefile
xen/include/asm-powerpc/config.h

diff --cc .hgignore
Simple merge
Simple merge
Simple merge
index 12621a8dfbb329f01731045cd5c7e603b0149a15,2ccc8615e9cc06f01dab6809bd184d3446ae5f87..52559885d14321337c5b35cffbb99d493be60b47
@@@ -246,71 -235,20 +235,74 @@@ class PPC_LinuxImageHandler(LinuxImageH
                                features       = self.vm.getFeatures(),
                                arch_args      = devtree.to_bin())
  
 +    def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb):
 +        """@param shadow_mem_kb The configured shadow memory, in KiB.
 +        @param maxmem_kb The configured maxmem, in KiB.
 +        @return The corresponding required amount of shadow memory, also in
 +        KiB.
 +        PowerPC currently uses "shadow memory" to refer to the hash table."""
 +        return max(maxmem_kb / 64, shadow_mem_kb)
 +
 +
 +class PPC_ProseImageHandler(LinuxImageHandler):
 +
 +    ostype = "prose"
 +
 +    def configure(self, imageConfig, deviceConfig):
 +        LinuxImageHandler.configure(self, imageConfig, deviceConfig)
 +        self.imageConfig = imageConfig
 +
 +    def buildDomain(self):
 +        store_evtchn = self.vm.getStorePort()
 +        console_evtchn = self.vm.getConsolePort()
 +
 +        mem_mb = self.getRequiredInitialReservation() / 1024
 +
 +        log.debug("dom            = %d", self.vm.getDomid())
 +        log.debug("memsize        = %d", mem_mb)
 +        log.debug("image          = %s", self.kernel)
 +        log.debug("store_evtchn   = %d", store_evtchn)
 +        log.debug("console_evtchn = %d", console_evtchn)
 +        log.debug("cmdline        = %s", self.cmdline)
 +        log.debug("ramdisk        = %s", self.ramdisk)
 +        log.debug("vcpus          = %d", self.vm.getVCpuCount())
 +        log.debug("features       = %s", self.vm.getFeatures())
 +
 +        devtree = FlatDeviceTree.build(self)
 +
 +        return xc.prose_build(dom            = self.vm.getDomid(),
 +                              memsize        = mem_mb,
 +                              image          = self.kernel,
 +                              store_evtchn   = store_evtchn,
 +                              console_evtchn = console_evtchn,
 +                              cmdline        = self.cmdline,
 +                              ramdisk        = self.ramdisk,
 +                              features       = self.vm.getFeatures(),
 +                              arch_args      = devtree.to_bin())
 +
 +    def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb):
 +        """@param shadow_mem_kb The configured shadow memory, in KiB.
 +        @param maxmem_kb The configured maxmem, in KiB.
 +        @return The corresponding required amount of shadow memory, also in
 +        KiB.
 +        PowerPC currently uses "shadow memory" to refer to the hash table."""
 +        return max(maxmem_kb / 64, shadow_mem_kb)
 +
 +
  class HVMImageHandler(ImageHandler):
  
-     def __init__(self, vm, imageConfig, deviceConfig):
-         ImageHandler.__init__(self, vm, imageConfig, deviceConfig)
+     ostype = "hvm"
+     def __init__(self, vm, vmConfig, imageConfig, deviceConfig):
+         ImageHandler.__init__(self, vm, vmConfig, imageConfig, deviceConfig)
          self.shutdownWatch = None
+         self.rebootFeatureWatch = None
  
-     def configure(self, imageConfig, deviceConfig):
-         ImageHandler.configure(self, imageConfig, deviceConfig)
+     def configure(self, vmConfig, imageConfig, deviceConfig):
+         ImageHandler.configure(self, vmConfig, imageConfig, deviceConfig)
  
          info = xc.xeninfo()
-         if not 'hvm' in info['xen_caps']:
+         if 'hvm' not in info['xen_caps']:
              raise VmError("HVM guest support is unavailable: is VT/AMD-V "
                            "supported by your CPU and enabled in your BIOS?")
  
Simple merge
Simple merge
Simple merge